package com.gillion.grule.client.utils;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import com.gillion.grule.client.exception.ExceptionType;
import com.google.common.collect.Maps;
import java.io.Serializable;
import java.util.Map;
import java.util.Properties;

@JsonIgnoreProperties(ignoreUnknown = true)
public class ResponseHeader implements Serializable {
    public static final int DEFAULT_SUCCESS_CODE = 2000000;

    public static final int DEFAULT_FAILURE_CODE = 5000000;

    public static final String COMMNAD_BATCH = "command/batch";

    public static final String COMMNAD_SIMPLE = "command/simple";

    private static final long serialVersionUID = 761952646612512462L;

    private String serviceCode;

    private String reqSysCode;

    private String providerSysId;

    private int returnCode;

    private String returnMessage;

    private ExceptionType exceptionType;

    private String contentType;

    private String serialNumber;

    private Properties properties = new Properties();

    private Map<String, Object> exceptionInfo = Maps.newConcurrentMap();

    public String getServiceCode() {
        return this.serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    public String getReqSysCode() {
        return this.reqSysCode;
    }

    public void setReqSysCode(String reqSysCode) {
        this.reqSysCode = reqSysCode;
    }

    public String getProviderSysId() {
        return this.providerSysId;
    }

    public void setProviderSysId(String providerSysId) {
        this.providerSysId = providerSysId;
    }

    public int getReturnCode() {
        return this.returnCode;
    }

    public void setReturnCode(int returnCode) {
        this.returnCode = returnCode;
    }

    public String getReturnMessage() {
        return this.returnMessage;
    }

    public void setReturnMessage(String returnMessage) {
        this.returnMessage = returnMessage;
    }

    public String getContentType() {
        return this.contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public Map<String, Object> getExceptionInfo() {
        return this.exceptionInfo;
    }

    public void setExceptionInfo(Map<String, Object> exceptionInfo) {
        this.exceptionInfo = exceptionInfo;
    }

    public Properties getProperties() {
        return this.properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public String getSerialNumber() {
        return this.serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public ExceptionType getExceptionType() {
        return this.exceptionType;
    }

    public void setExceptionType(ExceptionType exceptionType) {
        this.exceptionType = exceptionType;
    }

    public String toString() {
        return JSON.toJSONString(this);
    }
}
